package com.financing.wap.dao.impl;

import java.util.List;
import com.financing.wap.dao.impl.BaseDaoImpl;
import com.financing.wap.dao.IFpFundMCDao;
import com.financing.wap.dto.FpFundMCDTO;
import com.financing.wap.util.SqlName;

import org.springframework.stereotype.Repository;

/**
 * @Description:实现类
 * @author caojiayao
 * @version 1.0
 * @created 
 */
@Repository("fpFundMC")
public class FpFundMCDaoImpl extends BaseDaoImpl implements IFpFundMCDao {
	
	@Override
	public FpFundMCDTO getFpFundMC(Integer id) {
		return (FpFundMCDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.fpFundMC,id);
	}
	
	
	@Override
	public Integer insertFpFundMC(FpFundMCDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().insert(SqlName.insertFpFundMC,dto);
	}

	
	@Override
	public Integer updateFpFundMC(FpFundMCDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().update(SqlName.updateFpFundMC, dto);
	}
	
	@Override
	public Integer delFpFundMC(Integer id) {
		return (Integer) this.getSqlMapClientTemplate().delete(SqlName.delFpFundMC, id);
	}
	
	@Override
	public List<FpFundMCDTO> listFpFundMC(FpFundMCDTO dto) {
		return (List<FpFundMCDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundMC, dto);
	}
	
	@Override
	public List<FpFundMCDTO> listFpFundMCByPage(FpFundMCDTO dto) {
		return (List<FpFundMCDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundMCByPage, dto);
	}
	
	
	public Integer countFpFundMC(FpFundMCDTO dto){
		return (Integer)this.getSqlMapClientTemplate().queryForObject(SqlName.countFpFundMC, dto);
	}
	
	@Override
	public Class<FpFundMCDTO> getEntityClass() {
		return FpFundMCDTO.class;
	}
}
